package standard

import (
	"dag2.0/gat1400-proxy/context"
	"sync"
)



type Standard interface {
	GetPlaceCode(string)string
	GetFunctionType(int)string
}
var standard Standard

var once sync.Once
func StandardChoose() Standard {
	once.Do(func() {
		if context.GetString("gat1400.standard") == STANDARD_JIANGSU{
			standard = NewStandardJS()
		}else if context.GetString("gat1400.standard") == STANDARD_YISUO{
			standard = NewStandardYS()
		}else {
			standard = NewStandardJS()
		}
	})
	return standard
}
